import request from '@/api/socialized-servce/agr.js' //引入http.js
const api = request

export default {
	// 视频监控
	queryByFacilityNo(params){
		let url = 'v3/largeScreen/socializedData/cameraFacilityMapper/queryByFacilityNo'
		return api.request(url, 'get', params)
	},
	// 摄像头详细信息
	queryCameraAllInfo(cameraId){
		let url = `v3/largeScreen/socializedData/platformCamera/queryCameraAllInfo?cameraId=${cameraId}`
		return api.request(url, 'post')
	},
	// 摄像头控制
	// 操作命令：0-上，1-下，2-左，3-右，4-左上，5-左下，6-右上，7-右下，8-放大，9-缩小，10-近焦距，11-远焦距
	start(params){
		let url = 'v3/largeScreen/socializedData/cameraOperation/start'
		return api.request(url, 'post', {
			...params
		})
	},
	// 镜像翻转0-上下, 1-左右, 2-中心
	mirror(params){
		let url = 'v3/largeScreen/socializedData/cameraOperation/mirror'
		return api.request(url, 'post', {
			...params
		})
	},
	// 停止转动
	stop(params){
		let url = 'v3/largeScreen/socializedData/cameraOperation/stop'
		return api.request(url, 'post', {
			...params
		})
	},
	// 摄像头控制
	action(params){
		let url = 'v3/largeScreen/socializedData/cameraOperation/action'
		return api.request(url, 'post', {
			...params
		})
	},
	// 物联监测
	queryByCondition(params){
		let url = 'socialized/socialized-device/dataItem/queryByCondition'
		return api.request(url, 'post', params)
	},
	queryListById(params){
		let url = 'socialized/socialized-device/dataCollectNew/queryListByIds'
		return api.request(url, 'get', params)
	},
	queryHistory(params){
		let url = 'socialized/socialized-device/dataItem/queryHistory'
		return api.request(url, 'post', params)
	},
	queryByNo(params){
		let url = 'v3/largeScreen/socializedData/facility/queryByNo'
		return api.request(url, 'get', params)
	},
	// 获取运营方
	queryOperator(params) {
		let url = 'socialized/service/serviceProvider/queryByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 获取气象天气设备信息
	queryAtmosphereAndWeather(no){
		let url = `socialized/socialized-device/device/queryAtmosphereAndWeather?companyMask=${no}`
		return api.request(url, 'get')
	},
	// 获取用户订阅气象设备
	queryAtmosphereAndWeather0(no) {
		let url = `socialized/socialized-device/device/querySubAtmosphereAndWeather?serviceProviderNo=${no}`
		return api.request(url, 'get')
	},
	// 获取设备最新数据
	queryLastDataByDeviceNos(params){
		let url = 'socialized/socialized-device/device/queryLastData'
		return api.request(url, 'post', params)
	},
	// 获取设施设备与摄像头列表
	queryFGByFtNo(params){
		let url = 'socialized/socialized-device/device/queryPageByConditionAndGeo'
		return api.request(url, 'post', {
			...params
		})
	},
	// 获取用户订阅设备
	queryFGByFtNo0(params) {
		let url = 'socialized/socialized-device/device/querySubPageByConditionAndGeo'
		return api.request(url, 'post', {
			...params
		})
	},
	// 租户地块
	queryMyarable(params) {
		let url = 'v3/largeScreen/socializedData/facility/queryPageByConditionAndGeo'
		return api.request(url,'post',{
			...params
		})
	},
	// 获取设施设备与摄像头列表
	queryEquipment(params) {
		let url = 'socialized/socialized-device/device/queryInfoByConditionAndGeo'
		return api.request(url, 'post', params)
	},
	// 发送验证码
	queryVerificationCode(params) {
		let url = 'v3/notice/sms/queryVerificationCode'
		return api.request(url, 'get', params)
	},
	// 校验验证码
	checkCode(params) {
		let url = 'v3/notice/sms/checkCode'
		return api.request(url, 'post', params)
	}
}